package cz.muni.fi.pa165.mushroom.website.services;

import cz.muni.fi.pa165.mushroom.website.dto.MushroomDto;
import cz.muni.fi.pa165.mushroom.website.dto.MushroomTypeDTO;

import java.util.List;

/**
 * @author: Pavol Donko
 */
public interface MushroomService {
    /**
     * Adding Mushroom object into database.
     *
     * @param mushroomDto Object MushroomDto to be stored in database     
     */
    public void createMushroom(MushroomDto mushroomDto);

    /**
     * Updating Mushroom object in database.
     *
     * @param mushroomDto Object MushroomDto to be updated in database    
     */
    public void updateMushroom(MushroomDto mushroomDto);

    /**
     * Deleting Mushroom from database.
     *
     * @param mushroomDto Object MushroomDto to be deleted.
     */
    public void deleteMushroom(MushroomDto mushroomDto);

    /**
     * Finding specific Mushroom in database.
     *
     * @param id id of Mushroom to be found
     * @return mushroom DTO if found else null
     */
    public MushroomDto findMushroom(Long id);

    /**
     * List all mushrooms in database.
     *
     * @return List of mushrooms DTOs from database
     */
    public List<MushroomDto> listMushrooms();

    /**
     * List all mushrooms DTO based on preferred type.
     *
     * @param type of mushroom (edible, poisonous)
     * @return List of mushroom DTOs
     */
    public List<MushroomDto> listMushroomsWithType(MushroomTypeDTO type);
    
     /**
     * Method that lists all mushrooms DTO with preferred name.
     * 
     * @param name
     * @return list of mushrooms
     */
    public List<MushroomDto> listMushroomsWithName(String name);
    
    
}